import apiUrl from '../base'
import axios from '@/libs/axios'
const roleManagement = {
  // 角色列表
  roleList(prames) {
    return axios.post(`${apiUrl.base}v1/Role/list`, prames)
  },
  // 适用范围
  dictTypeCode(code) {
    return axios.get(`${apiUrl.base}v1/Dict/getListByTypeCode/${code}`, '')
  },
  // 编辑/详情角色
  roleDetail(prames) {
    return axios.post(`${apiUrl.base}v1/Role/details`, prames)
  },
  // 角色授权
  roleBeforeAdd() {
    return axios.post(`${apiUrl.base}v1/Role/beforeAdd`, '')
  },
  // 角色修改
  editRole(prames) {
    return axios.post(`${apiUrl.base}v1/Role/edit`, prames)
  },
  // 添加角色
  addRole(prames) {
    return axios.post(`${apiUrl.base}v1/Role/add`, prames)
  },
  // 删除角色
  deleteRole(prames) {
    return axios.post(`${apiUrl.base}v1/Role/delete`, prames)
  }
}
export default roleManagement
